package hongcaosp.app.android.comment;

import android.view.View;
import android.widget.TextView;

import hongcaosp.app.android.R;
import hongcaosp.app.android.common.BaseHolder;
import xlj.lib.android.base.view.OnRecycleItemClickListener;

public class CommentRangeHolder extends BaseHolder<CommentRange> {
    private TextView replyRangeTV;

    public CommentRangeHolder(View itemView, OnRecycleItemClickListener recycleItemClickListener) {
        super(itemView, recycleItemClickListener);

        replyRangeTV = itemView.findViewById(R.id.reply_more);
    }

    @Override
    public void setData(CommentRange commentRange) {
        super.setData(commentRange);
        if (commentRange.total - commentRange.hasSize > 0) {
            replyRangeTV.setText("还有" + (commentRange.total - commentRange.hasSize) + "条更多回复");
        } else {
            replyRangeTV.setText("");
        }
    }
}
